package com.yunban.project.article.model.domain;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.util.StringUtils;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
@TableName
@Schema(description = "文章记录")
public class Article implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    private String html;
    @Schema(description = "是否公开")
    private boolean published = false;
    @TableLogic
    private boolean deleted = false;
    @TableField(fill = FieldFill.INSERT)
    private long createdBy;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createdAt;
}
